package com.apestech.framework.sql.modul;

import com.apestech.framework.json.JSONObject;

public class LocalRole {
	
	private String postId;
	private String fields="";
	private String roleTable="AUT_BDQXMX";
	private JSONObject map=new JSONObject();
	
	public String getRoleTable() {
		return roleTable;
	}
	public void setRoleTable(String roleTable) {
		this.roleTable = roleTable;
	}public String getPostId() {
		return postId;
	}
	public void setPostId(String postId) {
		this.postId = postId;
	}
	public String getFields() {
		return fields;
	}
	public void setFields(String fields) {
		this.fields = fields;
	}
	
	public void add(String roleField, String field){
		if(!"".equals(this.fields)){
			this.fields=this.fields+";";
		}
		this.fields=this.fields+field;
		this.map.put(field, roleField);
	}
	
	public String getRoleField(String field){
		return this.map.getString(field);
	}
	
	public String toString(){
		return "{postId:"+this.postId+", fields:"+this.fields+",\n roleFields:"+this.map.toString()+"}";
	}

}
